package main

import (
	"sync/atomic"
	"fmt"
	"time"
)

/*
   @Time : 2019/6/27 16:11 
   @Author : ff
   @DESC   : 
*/

var (
	seq int64
)

func getSeqId() int64 {
	return atomic.AddInt64(&seq,1)
}

func main() {
	for i :=0;i < 100;i++  {
		go getSeqId()
	}

	time.Sleep(1000)
	fmt.Println(getSeqId())
}